Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tps init #7

Merged
merged 39 commits into from
Jan 1, 2019
Merged

Tps init #7

merged 39 commits into from
Jan 1, 2019

Conversation

vaipatel
Copy link
Owner

@vaipatel vaipatel commented Jan 1, 2019

I had great trouble in trying to run travis tests for the tps warping with 5 landmarks (and I imagine more).

The failure would occur intermittently, and always at the L matrix inversion step. Somewhere during the step the numpy internal algorithm would encounter NaN values (although the 5x2 matrix going in does not have any) and give up. Changing from just L_inv * Y0 to np.linalg.lstsq(L, Y0) seemed to give a more informative error - ValueError: On entry to DLASCL parameter number 4 had an illegal value.

Some googling reveals the above error to possibly be at the OpenBLAS level. I'm not sure at the moment, but if it is true, there is little I can do about it.

It could be that restricting travis to just py 3.6 might help (although I have only a small sample of tests I'm basing this on). But I've decided instead to restrict the tps warp dataset to squares for now, so that I can keep testing on py3.5, 3.6 and 3.7.

… apart from tps_coefs.

I might need the bending mat in semilmks relaxation. Here I'm just returning the pxp submat of L inverse.
In the 89 bookstein paper, I think he returns Linv*K*Linv, but I don't think that definition is used elsewhere.
Not sure.
I've really not tested things too thoroughly. For eg, not doing any checks on how the non-affine
part of the warp behaves.
I'm doing this to be able to use `solve` or `lstsq` next (instead of calculating the `inv`).
I'm requiring mkl cuz the intermitten fail on travis is very likely due to something wrong with OpenBLAS.
See statsmodels/statsmodels#5396.

I'm removing py3.5 because requiring mkl in install trips up tox, (or I guess more specifically
python setup.py, and it throws a DistUtilsError about not finding numpy>=1.10.0).
Removing mkl cuz it does not seem to help with the intermittent NaN issue on travis.
Trying to just test on osx.
I think this might be better because of the problem is really only when I have 5 or more lmks,
and this way I can have more oses.
The README_for_docs also contains a contents local directive at the beginning,
as well as links for the high-level ops.
@vaipatel vaipatel merged commit bed24c0 into master Jan 1, 2019
@vaipatel vaipatel deleted the tps-init branch January 1, 2019 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant